<!DOCTYPE html>
<html>
    <body>
        <div id="div">
            <p id="p1">不会被删除</p>
            <p id="p2">会被删除</p>
        </div>
        <script>
            var parent = document.getElementById("div");
            var child = document.getElementById("p2");

            parent.removeChild(child);
        </script>
    </body>
</html>